home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / SLTPU70C / SAMPLE4.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-10  |  681b  |  32 lines

  1.  
  2. Program Sample4;
  3.  
  4.   { Sample program to list currently logged on users }
  5.  
  6.  
  7. Uses Filedef,Chat;
  8.  
  9. var i: integer;
  10.     nodeinfo: nodetype;
  11.  
  12. Begin
  13.  
  14.   { Open CONFIG and NODES files }
  15.   if OpenFiles([CONFIGF,NODESF]) then begin
  16.  
  17.     { Process each node in node file }
  18.     for i:=1 to Maxnode do begin
  19.       readnode(nodeinfo,i);
  20.       writeln('Node ',i:2,': ',nodeinfo.name,', ',ChatStatus(nodeinfo.stat));
  21.     end;
  22.  
  23.     { Get total call information from record 0 }
  24.     writeln;
  25.     readnode(nodeinfo,0);
  26.     writeln('Total calls to ',cf.systemname,' BBS: ',nodeinfo.syscalls);
  27.  
  28.     CloseAllFiles;
  29.   end
  30.   else writeln('Could not open CONFIG File!');
  31.  
  32. end.